package com.evan.common.service.impl;

import com.evan.common.dao.RolesDao;
import com.evan.common.pojo.Roles;
import com.evan.common.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description:
 * @author: xiaohu
 * @createDate: 2021/7/20 22:20
 */
@Service
public class RolesServiceImpl implements RoleService {

    @Autowired
    RolesDao rd;

    @Override
    public List<Roles> getAllRoles() {
        return rd.findAll();
    }

    @Override
    public void addRole(Roles role) {
        rd.save(role);
    }
}
